package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.work.WorkContentBO;
import com.ymk.service.IWorkContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 岗位条件表 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-08-02
 */
@Service
public class WorkContentService implements IWorkContentService {

    @Override
    public WorkContentBO get(Map param) {
    return this.daoRouter.queryForObject("WorkContent.loadWorkContent",param);
    }

    @Override
    public List<WorkContentBO> list(Map param) {
        return this.daoRouter.query("WorkContent.loadWorkContent",param);
    }

    @Override
    public List<WorkContentBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("WorkContent.loadWorkContentForPage",pagination);
    }

    @Override
    public void post(WorkContentBO param) {
        this.daoRouter.insert("AWorkContent.insertWorkContent",param);
    }

    @Override
    public void update(WorkContentBO param) {
        this.daoRouter.update("AWorkContent.updateWorkContent",param);
    }

    @Override
    public void del(WorkContentBO param) {
        this.daoRouter.update("AWorkContent.delWorkContent",param);
    }

    @Override
    public void delete(WorkContentBO param) {
        this.daoRouter.delete("WorkContent.delete",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
